package jtk.project4.fleet.field;

import javax.swing.SortOrder;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.TableField;
import nl.coderight.jazz.form.field.TableField.AutoResizeMode;


public class POSelectionField extends GroupControl<String>{
	
	private TableField<String> poSelectionTable ;

 
	public POSelectionField(String bindID){
	//setTitle("header.poSelection");
	setBindID(bindID);
	createField();
	createLayout();
	}
	
	
	private void createField(){
		
		poSelectionTable = new TableField<String>("poSelections","poSelection");
		//poSelectionTable.setTitle("poSelection.header.table");
		poSelectionTable.setAutoResizeMode(AutoResizeMode.AUTOFIT);
		poSelectionTable.getSelectionValues();
		
		poSelectionTable.addColumn("label.VENDOR","VENDOR");
		poSelectionTable.addColumn("label.WO","WO");
		poSelectionTable.addColumn("label.PART#","PART#");
		poSelectionTable.addColumn("label.PARTNAME","PARTNAME");
		
		//poSelectionTable.sort("vendor",SortOrder,ASCENDING);
	}
	
	private void createLayout(){
		setLayout(new FormLayout())
		.addField(poSelectionTable);
		
	}
}
